<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>

        var obj = {
            name: 'yy',
            say: function () {
                console.log(666);
            }
        }

        obj.age = 17;
        console.log(obj);


        var arr = [1, 2, 3];
        // arr.length  是数组的系统属性
        // arr.push()  是数组的系统方法

        // 给arr这个数组添加了一个自定义的属性
        arr.name = 888;

        console.log(arr);

        console.log(arr.name);


        var arr2 = [2, 3, 4];
        console.log(arr2.name);



        var obj2 = {
            name: 'yy',
            score: [90, 20, 50],
            book: {
                name: '安徒生童话',
                price: '99'
            }
        }

        // 对象里面继续嵌套了对象  
        console.log(obj2.book.price);


        // oSpan.style.color = 'red' ;



    </script>

</body>

</html>